package com.gcxy.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.beans.factory.annotation.Value;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@ApiModel(value = "新增用户传入参数")
public class AddUserDTO {
	@ApiModelProperty(value = "人员姓名")
	@NotBlank(message = "人员姓名不能为空")
	@Size(max = 10,message = "人员姓名不能超过10个字符")
	private String userName;

	@ApiModelProperty(value = "手机号")
	@NotBlank(message = "手机号不能为空")
	@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
	private String userPhone;

	@ApiModelProperty(value = "用户状态;是否启用(1:启用，0:停用)")
	@NotNull(message = "用户状态不能为空")
	private Integer userStatus;
}
